package com.jd.finance.oss.exception;


import lombok.Data;

/**
 * 对象存储自定义异常类
 * @author xiejinlong
 */
@Data
public class OSSException extends Exception{

    private int errorCode;

    private String errorMessage;

    public OSSException(){}

    public OSSException(String errorMessage) {
        super(errorMessage);
        this.errorMessage = errorMessage;
    }

    public OSSException(String errorMessage, Exception e) {
        super(errorMessage, e);
        this.errorMessage = errorMessage;
    }

    public OSSException(int errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public OSSException(int errorCode, String errorMessage, Exception e) {
        super(errorMessage, e);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public void OSSException(int errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
